package ch06_test;

interface Something {

	void doSomething();

}

class A implements Something {

	public void doSomething() {

		System.out.println("A do something");
	}

}

public class Test extends A implements Something {

	public void doSomething() {

		System.out.println("B do something");

	}

	public static void main(String[] args) {

		A a1 = new Test();

		a1.doSomething();

		((A) a1).doSomething();

		A a2 = new A();

		a2.doSomething();

	}

}